﻿<local:DocumentBase x:Class="WPFExcelReport.FREWORK"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                    xmlns:fd="clr-namespace:Labs.Filtering;assembly=ReflectionStudio.Core"
                    xmlns:wep="clr-namespace:WPFExcelReport"
                    Height="700" Width="1024" 
                      
                    Loaded="Window_Loaded"
                    Title="FREWORK"  
                    >
    <local:DocumentBase.Resources>
    </local:DocumentBase.Resources>
    <Grid DataContext="{Binding}">
        <Grid.RowDefinitions>
            <RowDefinition Height="40" />
            <RowDefinition Height="190" />
            <RowDefinition Height="500" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*"/>
            <ColumnDefinition Width="1*" />
        </Grid.ColumnDefinitions>
        <StackPanel Grid.ColumnSpan="2" Orientation="Horizontal">
            <Button Content="刷新数据" Height="30" Margin="0,0,0,0"  Name="btnUpdate" Width="90" Click="btnUpdate_Click"/>
            <TextBlock FontSize="14"  Height="19"   Width="64"  Margin="5,10,0,0" Text="返修单号" />
            <TextBox  FontSize="14" Height="24"    Width="132" Name="txtORDER"   Margin="5,10,0,0"  Background="Bisque"/>
            <Button Content="仅生成报表(成品)" Height="30" Margin="10,0,0,0"  Name="btnQuery" Width="102" Click="btnQuery_Click"/>
            <Button Content="修布行(成品)" Height="30" Margin="5,0,0,0"  Name="btnPrintPreview" Width="90" Click="btnPrintPreview_Click"/>
            <Button Content="仅生成报表(坯)" Height="30" Margin="10,0,0,0"  Name="btnQueryG" Width="102" Click="btnQueryG_Click"/>
            <Button Content="修布行(坯)" Height="30" Margin="5,0,0,0"  Name="btnPrintPreviewG" Width="90" Click="btnPrintPreviewG_Click"/>
        </StackPanel>
        <fd:FilteringDataGrid 
            Grid.Row="1" Grid.RowSpan="2"
            CanUserReorderColumns="True"  
          CanUserResizeRows="True" CanUserSortColumns="True"
            IsFilteringCaseSensitive="False"
            AutoGenerateColumns="False"   
                  EnableRowVirtualization="True"  
                  RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                                IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                               ItemsSource="{Binding Path=ABPOS}" 
                               Margin="0,0,0,419" 
                               x:Name="ABPOSDataGrid" 
                               SelectionChanged="MainDataGrid_SelectionChanged" Grid.ColumnSpan="2">
            <fd:FilteringDataGrid.Columns>
                <DataGridTextColumn Header="回修厂" Binding="{Binding LSNAME1}"/>
                <DataGridTextColumn Header="回修单号" Binding="{Binding ORDERNO}"/>
                <DataGridTextColumn Header="原加工厂单号" Binding="{Binding ABKKDAUFTNR}"/>
                <DataGridTextColumn Header="原汇隆单号" Binding="{Binding ABKKDZEICH}"/>
                <DataGridTextColumn Header="类型" Binding="{Binding ABPWAKZ}"/>
                <DataGridTextColumn Header="品种" Binding="{Binding ARTICLE}"/>
                <DataGridTextColumn Header="后整理" Binding="{Binding ABPBESCHICH}"/>
                <DataGridTextColumn Header="数量" Binding="{Binding QTY}"/>
                <DataGridTextColumn Header="留位码数" Binding="{Binding ABPZUGET}"/> 
                <DataGridTextColumn Header="留位匹数" Binding="{Binding ABPZUGSTK}"/>
                <DataGridTextColumn Header="开单日期" Binding="{Binding ABKAEDAT}"/>
                <DataGridTextColumn Header="回修原因" Binding="{Binding REASON}"/>
            </fd:FilteringDataGrid.Columns>
        </fd:FilteringDataGrid  >
        <StackPanel Grid.Row="1" Grid.Column="1" Grid.RowSpan="2" Margin="0,0,0,0"></StackPanel>
        <fd:FilteringDataGrid IsFilteringCaseSensitive="False" AutoGenerateColumns="False" 
                              HorizontalAlignment="Stretch" VerticalAlignment="Stretch" 
                              ItemsSource="{Binding Path=WBBST}" Margin="0,81,0,30" 
                              x:Name="listWBBST" Grid.Row="2" Grid.ColumnSpan="2">
            <fd:FilteringDataGrid.Columns>
                <DataGridTextColumn Header="布卷号" Binding="{Binding WBBSTKNR}" />
                <DataGridTextColumn Header="数量" Binding="{Binding QTY}" />
                <DataGridTextColumn Header="缸号" Binding="{Binding WBBDPART}" />
                <DataGridTextColumn Header="备注" Binding="{Binding WBBBEM}" />
            </fd:FilteringDataGrid.Columns>
        </fd:FilteringDataGrid  >
    </Grid>
</local:DocumentBase>